This invention relates to a gamma correction method, a gamma correction unit, and an image read system.
Hitherto, to faithfully reproduce an input image as an output image, an image processing apparatus such as a scanner, a digital camera, a printer, or a display has made gamma correction so that γ of the whole from image input to final output becomes 1. γ is represented by the following expression wherein x is the input value and y is the conversion value:y=x1/γ  Expression 1
For example, an image read system for inputting an image from a scanner to a personal computer (PC) makes the following gamma correction:
First, in the scanner, an original is scanned at slow resolution and low-resolution image data is input. The low-resolution image data is gamma-corrected by an ASIC (application-specific integrated circuit) using a default LUT (look-up table) stored in ROM (read-only memory) of the scanner, and is transferred to the PC. The default LUT is read from the ROM of the scanner and is written into external SRAM etc., of the ASIC for use for the ASIC to make gamma correction. The default LUT is used tentatively before the nature of the image is determined.
Next, in the PC, an LUT to optimize gamma correction for the original is generated by a TWAIN driver based on the low-resolution image data transferred from the scanner.
Next, in the scanner, the LUT generated by the TWAIN driver is acquired from the PC and is written into main memory. The scanner combines the default LUT and the LUT generated by the TWAIN driver to create a new LUT by firmware, and writes the new created LUT into the external SRAM etc., of the ASIC.
Next, in the scanner, the original is scanned at high resolution and high-resolution image data is input. The high-resolution image data is gamma-corrected by the ASIC using the new LUT created by combining the LUTs, and is transferred to the PC. Consequently, the high-resolution image data subjected to the optimum gamma correction responsive to the original is input to the PC.
Generally, the LUT used for gamma correction requires the memory capacity responsive to the gradation of the image data before being gamma-corrected. Specifically, for example, if the image data before being gamma-corrected is a 16-bit gradation, a memory capacity of 65536 (=216) words is required. However, memory that can be random-accessed at high speed, such as SRAM generally used as memory of ASIC costs high per capacity, and the capacity that can be contained in the ASIC is limited due to the chip size; to externally connect the memory to the ASIC, the memory costs higher per capacity.
By the way, gamma correction is made using conversion using an LUT having a smaller number of conversion values than the number of gradation steps of input image data and linear interpolation in combination, whereby the data size of the LUT can be lessened.
However, a decrease in the data size of the LUT because of liner interpolation and the correction accuracy have trade-off relation and thus the data size of the LUT cannot much be lessened. Degradation in the correction accuracy caused by linear interpolation becomes noticeable particularly in a section in which fluctuation of change rate of the conversion value to the input value to the LUT is large. Therefore, for the image data input with a 16-bit gradation, a default LUT and an LUT generated by the TWAIN driver are combined to create an LUT of 4096 (=212) words, for example, and the image data is gamma-corrected using conversion with the LUT provided by combining the LUTS and linear interpolation of the low-order four bits in combination; the memory capacity required by the LUT is still large.